// 目录管理接口
import http from "./http";

// 获取目录列树
export const getDirs = (projectId) => http.get(`/api/dirs?project_id=${projectId}`);

// 创建目录树
export const createDir = (data) => http.post("/api/dirs", data);

// 修改目录标题
export const updateDirInfo = (id, data) => http.patch(`/api/dirs/${id}`, data);

// 删除目录
export const removeDir = (id) => http.delete(`/api/dirs/${id}`);
